using System;
using System.IO;
using System.Xml;

namespace Altova.IO
{
	public class ReaderInput : Input
	{
		private TextReader reader;

		public override Stream Stream
		{
			get
			{
				throw new Exception("This is not a stream");
			}
		}

		public override TextReader Reader
		{
			get
			{
				return reader;
			}
		}

		public override XmlDocument Document
		{
			get
			{
				throw new Exception("This is not an XML Dom tree");
			}
		}

		public ReaderInput(TextReader r)
			: base(InputType.Reader)
		{
			reader = r;
		}

		public override void Close()
		{
			reader.Close();
		}
	}
}
